<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="zh">
<head>
<meta charset="UTF-8">
<title>郴州互娱</title>
<meta name="viewport"
	content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0">
<meta name="format-detection"
	content="telephone=no,email=no,date=no,address=no">
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black" name="apple-mobile-web-app-status-bar-style">
<meta http-equiv="X-UA-Compatible" content="IE=edge">

<link href="${pageContext.request.contextPath}/css/wechat/weui.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/wechat/mmiconfont.css" rel="stylesheet">
<link href="${pageContext.request.contextPath}/css/wechat/wap.css" rel="stylesheet">

<script type="text/javascript" src="${pageContext.request.contextPath}/js/wechat/jquery-1.11.2.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/wechat/swiper-3.3.1.jquery.min.js"></script>
<script src="${pageContext.request.contextPath}/js/wechat/TouchSlide.1.1.js"></script>
<script src="${pageContext.request.contextPath}/js/common/common.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.min.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/layerui/layer.ext.js"></script>

<script type="text/javascript" src="${pageContext.request.contextPath}/js/ztree/jquery.ztree.core.js"></script>
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/zTreeStyle/demo.css" type="text/css">
<link rel="stylesheet" href="${pageContext.request.contextPath}/css/zTreeStyle/zTreeStyle.css" type="text/css">
<script type="text/javascript" src="${pageContext.request.contextPath}/js/ztree/jquery.ztree.core.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/ztree/jquery.ztree.excheck.js"></script>
<script type="text/javascript" src="${pageContext.request.contextPath}/js/ztree/jquery.ztree.exedit.js"></script>


<style>
.index-box-title {
	text-align: left
}

.discount {
	font-size: 14px;
	color: #f6ac56
}

.alert,.list{
     position: fixed;
     top:0;
     left: 0;
     width: 100%;
     background-color: rgba(0,0,0,0.8);
     /*display: none;*/
     height: 100vh;
 }
.list>div,.alert>div{
    position: absolute;
    top: 25%;
    width: 70%;
    left: 15%;
    background-color: #FFFFFF;
    padding: 5%;
    font-size: 0.8rem;
    font-family: "microsoft yahei";
}

.alert button{
    width: 45%;
}
label{
    font-weight: bold;
}
.list li button{
    width: 21%;
    padding: 0.1rem 0.5rem;
}
.alert button{
    width: 45%;
}
button{
    background-color: #3194ff;
    padding:0.5rem;
    outline: 0;
    border: none;
    color: #FFFFFF;
    font-family: "microsoft yahei";
    font-size: 0.8rem;
}

</style>

<SCRIPT type="text/javascript">
		
		var setting = {
			edit: {
				enable: true
			},
			data: {
				simpleData: {
					enable: true
				}
			},
			callback: {
				beforeDrag: beforeDrag,
				onRemove: onRemove,
			 	onRename: onRename
			}
		};

		var zNodes =[
			{ id:1, pId:0, name:"亲友免费棋牌圈", open:true},
			{ id:11, pId:1, name:"(100100)叶子节点 1-1叶子节点"},
			{ id:12, pId:1, name:"(100101)叶子节点 1-2叶子节点"},
			{ id:13, pId:1, name:"(100102)叶子节点 1-3叶子节点"},
			{ id:2, pId:0, name:"朋友圈", open:false},
			{ id:21, pId:2, name:"100103-叶子节点 2-1"},
			{ id:22, pId:2, name:"100104-叶子节点 2-2"},
			{ id:23, pId:2, name:"叶子节点 2-3"},
			{ id:3, pId:0, name:"牌友圈", open:false},
			{ id:31, pId:3, name:"叶子节点 3-1"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:32, pId:3, name:"叶子节点 3-2"},
			{ id:33, pId:3, name:"叶子节点 3-3"}
		];

		function beforeDrag(treeId, treeNodes) {
			return false;
		}
		
		function setEdit() {
			var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
			remove = $("#remove").attr("checked"),
			rename = $("#rename").attr("checked"),
			removeTitle = $.trim($("#removeTitle").get(0).value),
			renameTitle = $.trim($("#renameTitle").get(0).value);
			zTree.setting.edit.showRemoveBtn = remove;
			zTree.setting.edit.showRenameBtn = rename;
			zTree.setting.edit.removeTitle = removeTitle;
			zTree.setting.edit.renameTitle = renameTitle;
			showCode(['setting.edit.showRemoveBtn = ' + remove, 'setting.edit.showRenameBtn = ' + rename,
				'setting.edit.removeTitle = "' + removeTitle +'"', 'setting.edit.renameTitle = "' + renameTitle + '"']);
		}
		function showCode(str) {
			var code = $("#code");
			code.empty();
			for (var i=0, l=str.length; i<l; i++) {
				code.append("<li>"+str[i]+"</li>");
			}
		}
		
		$(document).ready(function(){
			$.fn.zTree.init($("#treeDemo"), setting, zNodes);
			setEdit();
			$("#remove").bind("change", setEdit);
			$("#rename").bind("change", setEdit);
			$("#removeTitle").bind("propertychange", setEdit)
			.bind("input", setEdit);
			$("#renameTitle").bind("propertychange", setEdit)
			.bind("input", setEdit);
			
			$("#add").bind("click", {isParent:false}, add);

		});
		
		// 删除触发事件
		function onRemove(e, treeId, treeNode) {
			alert("删除");
		 	showLog("[ "+getTime()+" onRemove ]&nbsp;&nbsp;&nbsp;&nbsp; " + treeNode.name);
		}
	 	
		// 修改触发s
		function onRename(e, treeId, treeNode) {
			alert("修改");
		 	showLog("[ "+getTime()+" onRename ]&nbsp;&nbsp;&nbsp;&nbsp; " + treeNode.name);
		}
		
		
		
		function add(e) {
	        var zTree = $.fn.zTree.getZTreeObj("treeDemo"),
	        isParent = e.data.isParent,
	        nodes = zTree.getSelectedNodes(),
	        //在选中节点后面添加
	        treeNode = nodes[0];
	        if (nodes.length == 0) {
	           alert("未选择节点，可添加新系统菜单根节点");
	           return ;
	        }
	        var menuId = treeNode.id ;  //  菜单ID
	        
	        $(".alert").css('display', 'block');
	       
	        
	        
	    };

	    function closeAlertClick() {
			$('.alert').css('display', 'none');
		}
		
</SCRIPT>

</head>
<body>

	<div class="alert" id="alertDivId" style="display: none;z-index: 10;">
        <div >
            <p>游戏ID: <input type="text" value="" style="width: 60px"> <button >搜索</button>  </p>
            <p style="margin-top:1rem">玩家信息</p>
            <p>游戏ID: <span id="taocanConfirmId"></span></p>
            <p>微信昵称：<span id="taocanConfirmId"></span></p>
            <br>
            <div>
                <button id="ok" onclick="confirmBuyCardClick()">发送邀请</button>
                <button style="background-color: #666;margin-left: 5%" id="close" onclick="closeAlertClick()">关闭</button>
            </div>
        </div>
    </div>

	<div class="main-box" >
		<!--图片轮播-->
		<div id="focus" class="focus" >
			<div class="hd">
				<ul>
					<li class="on">1</li>
					<li class="">2</li>
					<!-- <li class="">3</li>
					<li class="">4</li> -->
				</ul>
			</div>
			<div class="bd">
				<div class="tempWrap" style="overflow: hidden; position: relative;">
					<ul
						style="width: 1440px; position: relative; overflow: hidden; padding: 0px; margin: 0px; transition-duration: 200ms; transform: translate(0px, 0px) translateZ(0px);">
						<li
							style="display: table-cell; vertical-align: top; width: 360px;">
							<a href="index.html"> <img
								src="${pageContext.request.contextPath}/images/binyou/lb_01.jpg">
						</a>
						</li>
						<li
							style="display: table-cell; vertical-align: top; width: 360px;">
							<a href="index.html"> <img
								src="${pageContext.request.contextPath}/images/binyou/lb_02.jpg">
						</a>
						</li>
					</ul>
				</div>
			</div>
		</div>
		<script type="text/javascript">
			$(function() {
				$('.focus').show();
				TouchSlide({
					slideCell : "#focus",
					titCell : ".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
					mainCell : ".bd ul",
					effect : "left",
					autoPlay : true,//自动播放
					autoPage : true, //自动分页
					switchLoad : "_src" //切换加载，真实图片路径为"_src"
				});
			})
		</script>
		<!--商品-->
		<div class="index-box" style="z-index: 1">
			<div class="index-box-title">
				
				我的牌友圈
				<div style="float: right;font-size: 30px" >
				<label id="add">+</label>
				<label id="add">x</label>
				</div>
				
			</div>
			<div class="index-box-body">
				<div style="width: 100%">
					<ul id="treeDemo" class="ztree" style="width: 100%"></ul>
				</div>
			</div>
			<p style="font-size: 11px;color:#888a85; "><a href="player_to_user.html">
			【<u>说明：</u>】</a></p>
		
		</div>
	</div>
	<input type="checkbox" style="display: none;" id="remove" class="checkbox first" checked />
	<input type="checkbox" style="display: none;" id="rename" class="checkbox " checked />
	<input type="text" style="display: none;" id="removeTitle" value="remove" /><br/>
	<input type="text" style="display: none;" id="renameTitle" value="rename" />

<style>
.weui-tabbar__label {
	font-size: 14px;
}
</style>

	
	<script>
		$(function() {
			var ua = navigator.userAgent.toLowerCase();
		    if (ua.match(/MicroMessenger/i) == "micromessenger") {
		        //return true;
		    } else {
		    	//$("#isweixinDiv").css("display", "none");  
		    }
			
			var controller = "Shop";
			var action = "index";
			$('#tabbar-' + controller + '-' + action).addClass(
					'weui-bar__item_on');
		});
		
		var msg='${msg}';
	   	if(msg){
	   		ZCKJ.msg1(msg);
	   	}
	   	
	</script>

</body>
</html>